package com.zjitc.service.impl;

import com.github.pagehelper.PageHelper;
import com.zjitc.dao.CityDao;
import com.zjitc.pojo.City;
import com.zjitc.service.CityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created with IDEA
 * author:lhl
 * Date:2019/2/22 0022
 * Time:8:12
 */
@Service
public class CityServiceImpl implements CityService {
    @Autowired
    CityDao cityDao;
    @Override
    public List<City> findAll(int pageNum, int pageSize) {
        PageHelper.startPage(pageNum, pageSize);
        List<City> cities = cityDao.findAll();
        return cities;
    }
}
